import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'mpaas_method_channel.dart';

abstract class MpaasPlatform extends PlatformInterface {
  /// Constructs a MpaasPlatform.
  MpaasPlatform() : super(token: _token);

  static final Object _token = Object();

  static MpaasPlatform _instance = MethodChannelMpaas();

  /// The default instance of [MpaasPlatform] to use.
  ///
  /// Defaults to [MethodChannelMpaas].
  static MpaasPlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [MpaasPlatform] when
  /// they register themselves.
  static set instance(MpaasPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  Future<String?> getPlatformVersion() {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  Future<String?> pushGetToken() {
    throw UnimplementedError('getToken() has not been implemented.');
  }

  Future<bool> pushBindUserId(String userId) {
    throw UnimplementedError('pushBindUserId() has not been implemented.');
  }

  Future<bool> pushUnbindUserId(String userId) {
    throw UnimplementedError('pushUnbindUserId() has not been implemented.');
  }

  Future<bool> pushBindUserIdWithPhone(String userId, String phoneNumber) {
    throw UnimplementedError('pushBindUserIdWithPhone() has not been implemented.');
  }
}
